package com.qiyu.tech.tcc.starter.dao;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.qiyu.datasource.annotation.UsingDataSource;
import com.qiyu.tech.tcc.starter.model.StockFreeze;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import static com.qiyu.datasource.enums.DatasourceConfigEnum.TEST_GOODS_DB;


/**
 * @author linhao
 * @date created in 4:26 下午 2020/11/4
 */
@Mapper
@UsingDataSource(type = TEST_GOODS_DB)
public interface StockFreezeDao extends BaseMapper<StockFreeze> {

    @Update("update t_stock_freeze set valid=#{valid} where id=#{id}")
    int updateValidStatus(@Param("valid")int valid,@Param("id") int id);
}
